<template>
 <div class="lix-help">
   <div class="lix-help__container">
     <div class="list">
       <div class="item" v-for="(item, idx) in listData" :key="idx" @click="itemClick(item.id)">
         {{ item.title }}
       </div>
     </div>
   </div>
 </div>
</template>

<script>
export default {
  data () {
    return {
      listData: []
    }
  },
  created () {
    this.getList()
  },
  methods: {
    getList () {
      this.axios
        .get('/help', {
          headers: { FaseMode: false }
        })
        .then(res => {
          console.log(res)
          this.listData = res.data
        })
        .catch(e => {
          console.log(e)
        })
    },
    itemClick (id) {
      const url =
        window.location.protocol +
        '//' +
        window.location.host +
        '/#/helpdetail/' +
        id
      console.log(url)
      this.pushWeblink(url)
    }
  }
}
</script>

<style lang="less">
.lix-help {
  width: 100%;
  min-height: 100%;
  background-color: #f5f5f5;

  & .lix-help__container {
    border-top: 1px solid #e8e8e8;
    // border-bottom: 1px solid #e8e8e8;
    width: 100%;

    & .list {
      width: 100%;
      margin-top: 10px;
      display: flex;
      flex-direction: column;
      & .item {
        padding: 0 20px;
        height: 60px;
        background-color: #fff;
        font-size: 16px;
        line-height: 60px;
        color: #3f3f3f;
        border-bottom: 1px solid #e4e4e4;
      }
    }
  }
}
</style>
